package com.ruoyi.system.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.Map;

/**
 * 进度阶段DTO
 */
@Data
@ApiModel("进度阶段DTO")
public class ProgressStageDTO {

    @ApiModelProperty("主键ID")
    private Long id;

    @ApiModelProperty("模板ID")
    private Long templateId;

    @ApiModelProperty(value = "阶段顺序", required = true)
    @NotNull(message = "阶段顺序不能为空")
    private Integer stageOrder;

    @ApiModelProperty(value = "阶段名称", required = true)
    @NotBlank(message = "阶段名称不能为空")
    @Size(max = 15, message = "阶段名称长度不能超过15个字符")
    private String stageName;

    @ApiModelProperty(value = "进度状态名称(必填/选填)", required = true)
    @NotBlank(message = "进度状态名称不能为空")
    private String progressStatusName;

    @ApiModelProperty(value = "备注规则(必填/选填)", required = true)
    @NotBlank(message = "备注规则不能为空")
    private String remarkRule;

    @ApiModelProperty(value = "完成标识规则(需备注完成/自动完成)", required = true)
    @NotBlank(message = "完成标识规则不能为空")
    private String completionRule;

    @ApiModelProperty(value = "完成日期规则(备注填写日期/状态变更日期)", required = true)
    @NotBlank(message = "完成日期规则不能为空")
    private String completionDateRule;

    @ApiModelProperty("阶段描述")
    @Size(max = 100, message = "阶段描述长度不能超过100个字符")
    private String stageDesc;

    @ApiModelProperty(value = "关联H5模块(设计/工程)", required = true)
    @NotBlank(message = "关联H5模块不能为空")
    private String associatedH5Module;

    @ApiModelProperty(value = "状态映射关系", required = true)
    @NotNull(message = "状态映射关系不能为空")
    private Map<String, String> statusMappingMap;

    @ApiModelProperty("创建者")
    private String createBy;

    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty("更新者")
    private String updateBy;

    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;

    @ApiModelProperty("是否当前阶段")
    private Boolean isCurrentStage;

    @ApiModelProperty("完成状态")
    private Boolean isCompleted;

    @ApiModelProperty("完成备注")
    private String completionRemark;

    @ApiModelProperty("完成日期")
    private LocalDateTime completionDate;
}
